import 'logger_level.dart';
import 'zendesk_plugin_platform_interface.dart';
// 暴露给外部使用
export 'logger_level.dart';

class ZendeskPluginHelper {
  // 初始化SDK
  static Future<bool?> initZendeskSDK({
    required String zendeskIdentifier,
  }) {
    return ZendeskPluginPlatform.instance.initZendeskSDK(
      zendeskIdentifier: zendeskIdentifier,
    );
  }

  // 跳转到会话界面
  static Future<bool?> pushToConversation() {
    return ZendeskPluginPlatform.instance.pushToConversation();
  }

  // 获取未读消息数量
  static Future<int?> getUnreadCount() {
    return ZendeskPluginPlatform.instance.getUnreadCount();
  }

  // 设置日志开关
  static Future<bool?> setLoggerEnabled(bool enabled) {
    return ZendeskPluginPlatform.instance.setLoggerEnabled(enabled);
  }

  // 设置日志级别
  static Future<bool?> setLoggerLevel({
    required ZendeskLoggerLevel level,
  }) {
    return ZendeskPluginPlatform.instance.setLoggerLevel(level: level);
  }
}
